import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { MallComponent } from './components/mall/mall.component';
import { ShoppingCartComponent } from './components/shopping-cart/shopping-cart.component';
import { PersonalCenterComponent } from './components/personal-center/personal-center.component';

const routes: Routes = [
  { path: 'mall', component: MallComponent },
  { path: 'personalCenter', component: PersonalCenterComponent },

  { path: 'shoppingCart', component: ShoppingCartComponent },

  { path: '**', redirectTo: 'mall' }

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
